package com.reggie.module.entity.dto.employeeDto;

import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Author 早睡蛋
 * @Date 2022/9/17 15:11:36
 * @Desc:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EmployeeLoginDto implements Serializable {

    @ApiModelProperty(value = "用户名",required = true)
    @TableId("username")
    @NotEmpty(message = "用户名不能为空")
    @Pattern(regexp = "((^[A-Za-z0-9]+$))",message = "账号不合法,仅支持数字加字母")
    private String username;

    @ApiModelProperty(value = "密码",required = true)
    @TableId("username")
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "((^[A-Za-z0-9]+$))",message = "账号不合法,仅支持数字加字母")
    private String password;
}
